using ServiceStack.Reflection;
using System;
namespace ServiceStack
{
	internal static class HasPropertyId<TEntity>
	{
		private static readonly Func<TEntity, object> GetIdFn;
		static HasPropertyId()
		{
			HasPropertyId<TEntity>.GetIdFn = StaticAccessors<TEntity>.ValueUnTypedGetPropertyTypeFn(typeof(TEntity).GetIdProperty());
		}
		public static object GetId(TEntity entity)
		{
			return HasPropertyId<TEntity>.GetIdFn(entity);
		}
	}
}
